﻿using System;

namespace ProblemsSet
{
    public class Problem_77 : BaseProblem
    {
        public override object GetResult()
        {
            const int max = 5000;
            long res = 9;

            while(true)
            {
                res++;
                var val = MathLogic.GetCountOfFormedSumm(res, true);
                if (val > max) return res;
            }

        }

        public override string Problem
        {
            get
            {
                return @"It is possible to write ten as the sum of primes in exactly five different ways:

7 + 3
5 + 5
5 + 3 + 2
3 + 3 + 2 + 2
2 + 2 + 2 + 2 + 2

What is the first value which can be written as the sum of primes in over five thousand different ways?";
            }
        }

       public override bool IsSolved
        {
            get
            {
                return true;
            }
        }

        public override object Answer
        {
            get
            {
                return 71;
            }
        }

    }
}
